/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controladores;

import com.google.gson.Gson;
import utiles.HttpHelper;

/**
 *
 * @author fcarou
 */
public class BaseControlador
{
    protected HttpHelper helper;
    
    public BaseControlador (String path)
    {
        helper = new HttpHelper(path);
    }
    
    public boolean create (Object object)
    {
        Gson gson = new Gson();
        
        boolean b = Boolean.valueOf(helper.doPost(Constantes.CREATE, null, gson.toJson(object)));
        
        return b;
    }
}
